﻿using System;

namespace IdentityAtRest.Utility.Identity
{
    public class Claim : IClaim
    {
        public Claim()
        {
        }

        public Claim(string claimType, string claimValue)
        {
            ClaimType = claimType;
            Value = claimValue;
        }

        public Claim(string claimType,object claimValue)
        {
            ClaimType = claimType;
            Value = claimValue != null ? claimValue.ToString() : String.Empty;
        }

        #region IClaim Members

        public string ClaimType { get; set; }

        public string Value { get; set; }

        public string ValueType { get; set; }

        #endregion

        public Claim HavingValue(string value)
        {
            Value = value;
            return this;
        }
    }
}